<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /**
         * 字符串方法：
         * 1. split
         * 2. slice
         * 3. trim: 去除字符串左右两边空格,返回一个去除两侧空格后新的字符串
         * 
         */

        var str = '      a  b   c      ';
        console.log(str);

        console.log(str.trim());
    </script>
</body>
</html>